# this is the module to run for part 2

import CoinsGuess
import matplotlib.pyplot as plt


game = CoinsGuess.CoinsGuess()
resultList1 = list()
resultList2 = list()
X = 1000

# for each num of tosses in the range keeping the avg
# in a list, for each coin
for i in range(1,X):
    game.run(i)
    resultList1.append(game.avg1)
    resultList2.append(game.avg2)
    
plt.plot(range(1,X),resultList1, '-b')
plt.plot(range(1,X),resultList2, '-r')
plt.axis([0,X,0,1])
plt.yticks([0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1])
plt.show()